cmake_minimum_required(VERSION 3.4)
project(lodepng LANGUAGES CXX)

add_library(lodepng ${LODEPNG_SRC_DIR}/lodepng.cpp)
set_target_properties(lodepng PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)

include(GNUInstallDirs)
install(TARGETS lodepng
    RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
    LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
    ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install(FILES ${LODEPNG_SRC_DIR}/lodepng.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
